# 使用 alpine 作为基础镜像
FROM registry.cn-shanghai.aliyuncs.com/gong92-socl/alpine-nginx:v2
# FROM alpine:latest 原始构建

# 和单页面名称一致
ENV CODE /code/h5/

#COPY . ${CODE}

# 需要注意的是 需要把ng的配置文件放到这个目录下
COPY unpackage/dist/build/web/ ${CODE}

# .dockerignore 删除顶部的 **  这里才能被找到
ENV NGINX /etc/nginx/http.d/

# 确保 ng.conf 已复制到 CODE 目录
RUN cp ${CODE}ng.conf ${NGINX}



# docker build -t uniapp_vue2:v2 .
# docker tag f65a0935bf49 registry.cn-shanghai.aliyuncs.com/gong92-socl/uniapp_vue2:v2
# docker push registry.cn-shanghai.aliyuncs.com/gong92-socl/uniapp_vue2:v2
# docker pull registry.cn-shanghai.aliyuncs.com/gong92-socl/uniapp_vue2:v1 
# docker run -itd --name uniapp_vue_h5 -p 8883:80 --privileged=true registry.cn-shanghai.aliyuncs.com/gong92-socl/uniapp_vue2:v1 
# docker exec -it 450 /bin/sh